<extend name="Public/base"/>

<block name="body">
    <div class="fourm-top common-block" style="padding: 15px 20px;margin: -15px;margin-top: 0">
    <div class="row">

        <div class="col-xs-12">
            <h4>
                {:L('_EDIT_')}{:L('_REPLY_')}
            </h4>
            <hr/>
            <section id="contents">
                <form action="{:U('Group/Index/editReply')}" method="post" id="edit-article-form">
                    <input type="hidden" name="reply_id" value="{$reply.id}"/>
                    <p>
                        {:W('Common/Ueditor/editor',array('contentEditor','content',$reply['content'],'100%','250px'))}
                    </p>
                    <p>&nbsp;</p>
                    <p class="pull-right">
                        <button type="submit" class="btn btn-large btn-primary" id="submit-button">
                            <span class="glyphicon glyphicon-edit"></span>
                            {:L('_EDIT_')}{:L('_REPLY_')}
                        </button>
                    </p>
                </form>
            </section>
        </div>
    </div>
</div>

</block>



<block name="script">
    <script>
        //点击编辑或发表按钮之后
        $(function(){
            $('#edit-article-form').submit(function(e){
                $('[type=submit]', $(this)).addClass('disabled');
                //获取用户输入的内容
                var postData = $(this).serialize();
                var action = $(this).attr('action');
                $.post(action, postData, function(a){
                    handleAjax(a);
                });
                //停止提交
                e.preventDefault()
                return false;
            });

        })
    </script>
</block>
